import { Layout } from '@fl/utils/routerHelper'

import authority from './modules/authority'
import baseData from './modules/base-data'
import exploitSetting from './modules/exploit-setting'
import orgRole from './modules/org-role'
import organization from './modules/organization'
import right from './modules/right'
import role from './modules/role'

const adminRoute: AppRouteRecordRaw = {
    children: [
        organization,
        orgRole,
        role,
        right,
        authority,
        baseData,
        exploitSetting,
    ],
    component: Layout,
    meta: {
        roles: ['admin'],
        title: '后台管理',
    },
    name: 'admin',
    path: '/admin',
    redirect: '/admin/organizational',
}

export default adminRoute
